package com.dsg.kf.socket.handler;

import java.util.concurrent.ConcurrentHashMap;

import org.springframework.stereotype.Component;

import com.corundumstudio.socketio.AckRequest;
import com.corundumstudio.socketio.SocketIOClient;
import com.corundumstudio.socketio.annotation.OnEvent;
import com.dsg.kf.socket.message.MyMessage;
import com.dsg.kf.socket.message.Room;
/**
 * 
 * @author pacy.pan
 *
 */
@Component
public class MessageHandler {

    public static final ConcurrentHashMap<String, Room> rooms = new ConcurrentHashMap<String, Room>();

    @OnEvent(value = "getmessage")
    public void actite(SocketIOClient client, MyMessage message, AckRequest ackRequest) {
    	client.sendEvent("mymessage", message.getContext());
    }

}
